export interface ISpuData {
  records: ISpuList[]
  total: number
  size: number
  current: number
  orders: any[]
  optimizeCountSql: boolean
  hitCount: boolean
  countId?: any
  maxLimit?: any
  searchCount: boolean
  pages: number
}

export interface ISpuList {
  category3Id: number | string
  id?: number
  createTime?: string
  updateTime?: string
  spuName: string
  description: string
  tmId: number | string
  spuSaleAttrList?: ISpuSaleAttrData[] | null
  spuImageList?: ISpuImage[] | null
  spuPosterList?: any
}

export interface ISpu1 {
  id: number
  createTime: string
  updateTime: string
  tmName: string
  logoUrl: string
}

export interface ISpuImage {
  id?: number
  createTime?: string
  updateTime?: string
  spuId?: number
  imgName: string
  imgUrl: string
}

export interface ISaleAttr {
  id: number
  name: string
}

export interface ISpuSaleAttrData {
  id?: number
  createTime?: any
  updateTime?: any
  spuId?: number
  baseSaleAttrId: number | string
  saleAttrName: string
  spuSaleAttrValueList: ISpuSaleAttrValueList[]
  flag?: boolean
  saleAttrValue?: string
  saleIdAndValueId?: string
}

export interface ISpuSaleAttrValueList {
  id?: number | string
  createTime?: any
  updateTime?: any
  spuId?: number
  baseSaleAttrId: number | string
  saleAttrValueName: string
  saleAttrName?: string
  isChecked?: any
}

export interface ISkuFormData {
  category3Id: number
  spuId: number
  tmId: number
  skuName: string
  price: number
  weight: number
  skuDesc: string
  skuAttrValueList: IAttrValueItem[]
  skuSaleAttrValueList: ISaveAttrValueItem[]
  skuDefaultImg: string
}
interface IAttrValueItem {
  attrId: string | number
  valueId: string | number
}
interface ISaveAttrValueItem {
  saleAttrId: string | number
  saleAttrValueId: string | number
}

export interface ISkuItem {
  id: number
  createTime: string
  updateTime: string
  spuId: number
  price: number
  skuName: string
  skuDesc: string
  weight: string
  tmId: number
  category3Id: number
  skuDefaultImg: string
  isSale: number
  skuImageList?: any
  skuAttrValueList?: any
  skuSaleAttrValueList?: any
}
